import request from '@/utils/request'

// 创建新的市场人员
export function insertmarketer(params) {
  return request({
    url: '/mgrService/marketerManage/insertmarketer',
    method: 'post',
    data: params
  })
}
// 市场人员关联院校分页查询
export function academyIdAndName(params) {
  return request({
    url: '/mgrService/marketerManage/academyIdAndName',
    method: 'post',
    data: params
  })
}
// 市场人员关联高中分页查询
export function highSchoolByPage(params) {
  return request({
    url: '/mgrService/highSchool/marketerHighSchoolByPage',
    method: 'post',
    data: params
  })
}
// 恢复该市场人员
export function startmarketer(id) {
  return request({
    url: `/mgrService/marketerManage/startmarketer/${id}`,
    method: 'get'
  })
}
// 禁止该市场人员
export function stopmarketer(id) {
  return request({
    url: `/mgrService/marketerManage/stopmarketer/${id}`,
    method: 'get'
  })
}
// 修改市场人员信息
export function updatemarketer(params) {
  return request({
    url: '/mgrService/marketerManage/updatemarketer',
    method: 'post',
    data: params
  })
}
// 通过院校名称和市场人员名字查询人员列表
export function nameAndSchool(params) {
  return request({
    url: '/mgrService/marketerManage/nameAndSchool',
    method: 'post',
    data: params
  })
}
// 分页查询高中
// export function highSchoolList(params) {
//   return request({
//     url: '/mgrService/highSchool/highSchoolByPage',
//     method: 'post',
//     data: params
//   })
// }
// 通过院校名称或省份查询学校
export function nameAndProvince(params) {
  return request({
    url: '/mgrService/marketerManage/queryAcademyByNameAndProvince',
    method: 'post',
    data: params
  })
}
// 通过名称或省份查询高中
// export function nameAndProvinceHigh(params) {
//   return request({
//     url: '/mgrService/highSchool/highSchoolByTitleAndArea',
//     method: 'post',
//     data: params
//   })
// }
// 通过市场人员id、院校id删除关联院校
export function deleteSchoolById(params) {
  return request({
    url: '/mgrService/marketerManage/deleteschool',
    method: 'post',
    data: params
  })
}
// 根据院校名称模糊查询院校
export function queryLikeSchoolByName(params) {
  return request({
    url: '/mgrService/marketerManage/queryLikeSchoolByName',
    method: 'post',
    data: params
  })
}
// 对指定市场人员新增关联院校
export function addNewAcademy(params) {
  return request({
    url: '/mgrService/marketerManage/addNewAcademy',
    method: 'post',
    data: params
  })
}
// 对指定市场人员新增关联高中
export function addNewHighSchool(params) {
  return request({
    url: '/mgrService/highSchool/addNewHighSchool',
    method: 'post',
    data: params
  })
}
// 对指定市场人员删除关联高中
export function deleteSchool(params) {
  return request({
    url: '/mgrService/highSchool/deleteMarketerHighSchool',
    method: 'post',
    data: params
  })
}
// 根据省份筛选院校 --- 全选
export function querySchoolByProvince(params) {
  return request({
    url: '/mgrService/marketerManage/querySchoolByProvince',
    method: 'post',
    data: params
  })
}
// 通过id找到关联的高中列表
export function haveSchools(params) {
  return request({
    url: '/mgrService/highSchool/getMarketerHighSchoolByPage',
    method: 'post',
    data: params
  })
}
// 通过手机和姓名查市场人员分页列表--高中
export function searchMarketer(params) {
  return request({
    url: '/mgrService/highSchool/queryHighSchoolFilterByPage',
    method: 'post',
    data: params
  })
}

// 通过手机和姓名查市场人员分页列表--院校
export function searchMarketer_academy(params) {
  return request({
    url: '/mgrService/marketerManage/academyFilterByNameAndMobile',
    method: 'post',
    data: params
  })
}

// 导入Excel 人员账号表格
export function upload(params){
  return request({
    url: '/mgrService/excel/batchImport',
    method: 'post',
    data: params
  })
}
